import os
import django

DJANGO_ROOT=os.path.dirname(os.path.realpath(django.__file__))
SITE_ROOT=os.path.dirname(os.path.realpath(__file__))
DATE_FORMAT='Y-m-d'

# Django settings for mysite project.

DEBUG = True
TEMPLATE_DEBUG = DEBUG

ADMINS = (
	('chris2fr', 'christopher@mann.fr'),
)

MANAGERS = ADMINS


#DATABASE_ENGINE='mysql'
#DATABASE_NAME=''
#DATABASE_USER = 'galleryuser'             # Not used with sqlite3.
#DATABASE_PASSWORD = 'natalie'         # Not used with sqlite3.

DATABASE_ENGINE = 'sqlite3'    # 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'ado_mssql'.
DATABASE_NAME = SITE_ROOT + '/djtj3.db' # Or path to database file if using sqlite3.
#DATABASE_ENGINE='mysql'
#DATABASE_NAME='tj3'
#DATABASE_USER='root'
#DATABASE_PASSWORD='natalie'
#DATABASE_HOST = ''             # Set to empty string for localhost. Not used with sqlite3.
#DATABASE_PORT = ''             # Set to empty string for default. Not used with sqlite3.

TIME_ZONE = 'Europe/Paris'

LANGUAGE_CODE = 'en-us'

SITE_ID = 1

USE_I18N = True

MEDIA_ROOT = os.path.join(os.path.dirname(SITE_ROOT), 'djtj3', 'media')

# URL that handles the media served from MEDIA_ROOT.
# Example: "http://media.lawrence.com"
MEDIA_URL = '/media/'

# Absolute path to directory serving static files such as CSS, Javascripts
STATIC_DOC_ROOT = MEDIA_ROOT

ADMIN_MEDIA_PREFIX = '/media/admin/'

# Make this unique, and don't share it with anybody.
SECRET_KEY = 'vmrj&a6l6d3pt+a@0v!e_v&=93p03anu-xp#1ozrqban6wb_s%'

# List of callables that know how to import templates from various sources.
TEMPLATE_LOADERS = (
    'django.template.loaders.filesystem.load_template_source',
    'django.template.loaders.app_directories.load_template_source',
#     'django.template.loaders.eggs.load_template_source',
)

MIDDLEWARE_CLASSES = (
    'django.middleware.common.CommonMiddleware',
    'django.contrib.sessions.middleware.SessionMiddleware',
    'django.contrib.auth.middleware.AuthenticationMiddleware',
    'django.middleware.doc.XViewMiddleware',
    'django.middleware.csrf.CsrfViewMiddleware',
    'django.middleware.csrf.CsrfResponseMiddleware',    
)

ROOT_URLCONF = 'djtj3.urls'

TEMPLATE_DIRS = (
    os.path.join(SITE_ROOT,'templates'),                                                                                                                                                                                                                                 
)

INSTALLED_APPS = (
    'django.contrib.auth',
    'django.contrib.contenttypes',
    'django.contrib.sessions',
    'django.contrib.sites',
    'django.contrib.admin',
    'django_extensions',
    'mptt',
    'djtj3.tj3',
    'taggit', #tagging
    'taggit_templatetags',
)

# Allow the following .ext to be uploaded
ALLOWED_IMAGE_EXT = ['.jpg', '.jpeg', '.png', '.gif', '.bmp',]

#LOGIN_REDIRECT_URL='/mysite/'
